package src;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;

public class Train{
	//Attribute for the train
	Rectangle train;
	
	//Position of train x and y
	private int x;
	private int y;
	
	//Velocity of train
	private Double velocity;
	
	/**
	 * Method to create a new train
	 * @param p use method setLocation(x, y);
	 * @param d use method setSize(w, h);
	 */
	public Train(Point p, Dimension d){
		this.train = new Rectangle(p, d);
		this.x = train.getLocation().x;
		this.y = train.getLocation().y;		
	}
	
	/**
	 * Method to change the position on train
	 * @param x of cartesian plane
	 * @param y of cartesian plane
	 */
	public void changePosition(int x, int y){
		this.x = x;
		this.y = y;
	}
	
	/**
	 * Method for controlling the velocity
	 * @param v of change the speed that the train moves
	 * between pixels
	 */
	public void changeVelocity(Double v){
		
	}
}
